package gui;

import java.awt.BorderLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;

import javax.swing.JPanel;

@SuppressWarnings("serial")
public class OverdueTasksPanel extends JPanel {
	private TasksListingPanel tasksListingPanel;

	public OverdueTasksPanel() {
		setEnvironment();

		JPanel temp = new JPanel(new GridBagLayout());
		temp.setOpaque(false);
		GridBagConstraints c = new GridBagConstraints();
		
		tasksListingPanel = new TasksListingPanel();
		c.fill = GridBagConstraints.HORIZONTAL;
		c.weightx = 0.5;
		c.gridx = 0;
		c.gridy = 0;
		temp.add(tasksListingPanel, c);

		add(temp, BorderLayout.CENTER);
	}

	public void updatePanel(String[][] tasks) {
		tasksListingPanel.updateTable(tasks);
	}
	private void setEnvironment() {
		setLayout(new BorderLayout());
		setSize(Dimensions._windowWidth,Dimensions._windowHeight);
		setOpaque(false);
	}
}
